/*
 * Part of knowledge engineering (ke) course work, 2010/11
 */
package se.bth.ke.firstfriend.dto;

import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import se.bth.ke.firstfriend.model.Article;

/**
 * Info for a given article
 * @author nico.rehwaldt
 */
@XmlRootElement
public class ArticleInfo {

    @XmlTransient
    private Article article;

    @XmlTransient
    private List<Article> dependsOn;

    @XmlTransient
    private List<Article> dependentArticles;

    public ArticleInfo() {}

    public ArticleInfo(Article article) {
        this.article = article;
    }

    public String getSluggedId() {
        return article.getSluggedId();
    }
    
    @XmlElement
    public String getTitle() {
        return article.getTitle();
    }

    @XmlElement
    public Long getId() {
        return article.getId();
    }

    /**
     * @return the dependsOn
     */
    public List<Article> getDependsOn() {
        return dependsOn;
    }

    /**
     * @param dependsOn the dependsOn to set
     */
    public void setDependsOn(List<Article> dependsOn) {
        this.dependsOn = dependsOn;
    }

    /**
     * @return the dependentArticles
     */
    public List<Article> getDependentArticles() {
        return dependentArticles;
    }

    /**
     * @param dependentArticles the dependentArticles to set
     */
    public void setDependentArticles(List<Article> dependentArticles) {
        this.dependentArticles = dependentArticles;
    }
}
